fix: host_university 테이블의 korean_name 필드에 unique key 추가#645
fix: host_university 테이블의 korean_name 필드에 unique key 추가#645whqtker wants to merge 2 commits intosolid-connection:developfrom
Conversation
Walkthrough1. Java 엔티티 업데이트. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In
`@src/main/resources/db/migration/V44__add_unique_constraint_to_host_university_korean_name.sql`:
- Around line 1-2: The migration ADD CONSTRAINT uk_host_university_korean_name
on table host_university will fail if duplicate korean_name values exist; add a
cleanup migration that finds and resolves duplicates in
host_university.korean_name (either delete/merge duplicate rows or keep the
desired row and remove others) before applying the UNIQUE constraint, and
include a pre-deployment duplicate-check SQL query (e.g., SELECT korean_name,
COUNT(*) FROM host_university GROUP BY korean_name HAVING COUNT(*)>1) plus a
brief documented procedure for manual review/merge so the ALTER TABLE in
V44__add_unique_constraint_to_host_university_korean_name.sql succeeds reliably.
관련 이슈
작업 내용
같은 값을 가지는
korean_name은 사실상 없기에 UK를 설정합니다.기존
homeUniversityRepository를 사용한 테스트 코드를 올바르게 동작하도록 수정했습니다. 이전에는 중복 이름이 생성 가능했으나, 해당 변경으로 인해 불가능해졌고, test용 repository를 생성하고 이를 사용하도록 변경했습니다.특이 사항
리뷰 요구사항 (선택)